/**
 * 
 */
package yanivosher.aiproject;

/**
 * @author Yaniv n Osher
 * 
 */
public class Step {

	Vertex destination;
	Vertex current;
	Boolean chem;
	Boolean military;

	public Step(Vertex destination, Vertex current, Boolean chem,
			Boolean military) {
		super();
		this.destination = destination;
		this.current = current;
		this.chem = chem;
		this.military = military;
	}

	public Step() {
		super();
	}

	public Vertex getDestination() {
		return destination;
	}

	public void setDestination(Vertex destination) {
		this.destination = destination;
	}

	public Vertex getCurrent() {
		return current;
	}

	public void setCurrent(Vertex current) {
		this.current = current;
	}

	public Boolean getChem() {
		return chem;
	}

	public void setChem(Boolean chem) {
		this.chem = chem;
	}
	
	public Boolean getNoMove() {
		return getCurrent().equals(getDestination());
	}
	
	public Boolean getMilitary() {
		return military;
	}

	public void setMilitary(Boolean military) {
		this.military = military;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Step [" + current + " --> " + destination
				+ ", chem=" + chem + ", military=" + military + "]";
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Step other = (Step) obj;
		if (chem == null) {
			if (other.chem != null)
				return false;
		} else if (!chem.equals(other.chem))
			return false;
		if (current == null) {
			if (other.current != null)
				return false;
		} else if (!current.equals(other.current))
			return false;
		if (destination == null) {
			if (other.destination != null)
				return false;
		} else if (!destination.equals(other.destination))
			return false;
		if (military == null) {
			if (other.military != null)
				return false;
		} else if (!military.equals(other.military))
			return false;
		return true;
	}

	
}
